package com.ccc.scala.base11_generic

object Generic01 {
  def main(args: Array[String]): Unit = {
    // 泛型不可变
    val test1 : Test[User] = new Test[User] // OK
    // val test2 : Test[User] = new Test[Parent] // Error
    // val test3 : Test[User] = new Test[SubUser]  // Error

  }
  class Test[T] {
  }
  class Parent {
  }
  class User extends Parent{
  }
  class SubUser extends User {
  }

}
